package net.dfrz.oa.pojo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 二级菜单类
 * @author vovh
 *
 */
@Entity
@Table(name="t_twocategory")
public class TwoCategory implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String name;//二级菜单名称
	private String url;//二级菜单访问路径
	private OneCategory oneCategory;//n-1 onecategoryId
	@GeneratedValue
	@Column(name="id")
	@Id
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
		
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	@JoinColumn(name="onecategoryId")
	@ManyToOne
	public OneCategory getOneCategory() {
		return oneCategory;
	}
	public void setOneCategory(OneCategory oneCategory) {
		this.oneCategory = oneCategory;
	}
	
}
